# -*- coding: utf-8 -*-

#import sys
#my_logger=None

import sys
import os
import logging.config
from collections import deque

_glv_dict = {}
gl_RUNNING = True
gl_que_plate = deque(maxlen=20)
gl_dq_last = deque(maxlen=3) #存放当前带钢和上一带钢数据
gl_lst_shpsav = []#item = {'oid':oid, 'filename':filename}

filepath = os.path.join(os.path.dirname(__file__), 'logging.conf')
logging.config.fileConfig(filepath)
gl_log = logging.getLogger('cycleRent')

def _init():
    pass
    #global _gl_dict

    #_gl_dict = {}

def set_value(name,value):
    global _glv_dict
    _glv_dict[name] = value


def get_value(name, def_val=None):
    global _glv_dict
    try:
        return _glv_dict[name]
    except KeyError:
        return def_val
